Method and apparatus for low cost, high accuracy temperature sensor

ABSTRACT

The invention may provide a temperature sensor device that includes an analog temperature sensor to generate a first base-emitter voltage and a second base-emitter voltage, and an analog-to-digital converter (ADC) to sample at the voltages and generate corresponding digital values. The temperature sensor device may also include a logic unit to calculate a digital temperature code from the digital values using a digital virtual reference.

BACKGROUND

The present invention relates to temperature sensors.

Generally, a temperature sensor is composed of analog circuitry whereeither an output voltage or current signal is generated that isproportional to ambient temperature. The analog circuitry'ssignal-to-temperature gain is typically very small (e.g., below a fewmV). Therefore, induced offsets, either voltage or current, or componentmismatch can result in substantial temperature sensor inaccuracies.Further, analog-to-digital conversion errors can add more inaccuraciesto the temperature sensing process. For example, unstable referencevoltages used in a analog-to-digital converter (ADC) can causeinaccurate variances such as gain errors in the temperature sensorresults.

To mitigate these inaccuracies, conventional systems employ apost-trimming procedure on both the analog circuitry and the ADCreference voltage generator. The post-trimming procedure would test andtune each temperature sensor in a manufacturing lot individually. Thus,post-trimming significantly increases production costs by increasingtesting time for multiple temperature testing and increasing additionalwafer and die cost to implement post-trimming circuitry such as specialelectrical fuses. As a result, post-trimming restricts mass productioncapability and, consequently, temperature sensor integration.

Hence, the inventors recognized a need in the art for a low cost yetaccurate temperature sensor.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified block diagram of a temperature sensor accordingto an embodiment of the present invention.

FIG. 2 is a simplified circuit diagram of an analog sensor according toan embodiment of the present invention.

FIG. 3 is a simplified circuit diagram of an analog sensor according toan embodiment of the present invention.

FIG. 4 is a timing diagram of temperature sensor operations according toan embodiment of the present invention.

FIG. 5 is a simplified block diagram of a temperature sensor accordingto an embodiment of the present invention.

FIG. 6 is a simplified circuit diagram of an analog sensor according toan embodiment of the present invention.

FIG. 7 is a timing diagram of temperature sensor operations according toan embodiment of the present invention.

FIG. 8 is a simplified block diagram of an electronic device with anintegrated temperature sensor according to an embodiment of the presentinvention.

DETAILED DESCRIPTION

Embodiments of the present invention may provide a temperature sensordevice that includes an analog voltage generator to generate a firstvoltage and a second voltage that vary in proportion to ambienttemperature, and an analog-to-digital converter (ADC) to sample thevoltages and generate corresponding digital values using a referencevoltage. The temperature sensor device may also include a logic unit tocalculate ambient temperature from a comparison of the digital values,wherein the ambient temperature calculation is independent of referencevoltage variations.

The temperature sensor device's use of a digital virtual reference tocalculate the digital temperature code may provide an accuratetemperature measurement that is independent of reference voltagevariations in the ADC and associated inaccuracies. The reference voltagevariations may not effect the digital temperature code because thevariations will be cancelled out with the digital virtual reference use.Component mismatches may also be similarly cancelled out with thedigital virtual reference use.

FIG. 1 is a block diagram of a temperature sensor 100 according to anembodiment of the present invention. The temperature sensor 100 may beprovided, at least in part, by CMOS components. The temperature sensor100 may include an analog sensor 110, a multiplexer 120, an ADC 130, areference amplifier 140, a logic unit 150, an a register 155, and acontrol circuit 160.

The analog sensor 110 may generate two different base-emitter voltagesignals Vbe1, Vbe2 sequentially (i.e., one at a time). The twobase-emitter voltages Vbe1, Vbe2 may vary proportionally to ambienttemperature and may have complementary-to-absolute temperature (CTAT)characteristics, meaning they increase with increasing temperature.

In an embodiment, the analog sensor 110 may be provided as a singlesubstrate PNP BJT device with two different current densities. Theanalog sensor 110 operations, such as selection of the base-emittervoltages, chopping, and enabling (powering up/down), may be performed inaccordance with respective control signals from the control circuit 160.

The control circuit 160 may control the operations of the temperaturesensor 100 and its components. For example, the control circuit 160 mayreceive a clock signal Clk and provide timing signals to othercomponents in the temperature sensor 100. The control circuit 160 may beprovided as a microcontroller, a microprocessor, a state machine or thelike.

The analog sensor 110 may output the base-emitter voltages Vbe1, Vbe2 tothe multiplexer 120. The multiplexer 120 may also receive a groundinput, Gnd. Based on a selection signal from the control circuit 160,the multiplexer 120 may transmit its received signals (e.g., Vbe1, Vbe2,Gnd) to the ADC 130.

The ADC 130 may digitize the input analog signals using a referencevoltage Vref. In an embodiment, the reference voltage may be generatedbased on a band gap voltage Vbg generated by the analog sensor. The bandgap voltage Vbg may be amplified by the reference amplifier 140 togenerate the reference voltage Vref. Alternatively, the referencevoltage may be provided from another supply source. Ordinarily Vrefvariations that are induced by temperature variations, for example,within the system might induce conversion errors in the ADC's output.Nonetheless, such conversion errors are mitigated by the temperaturesensor 100 as explained below.

The ADC 130 may sample the input signals and generate correspondingdigital values in respective conversion operations. For example, the ADC130 may receive the Vbe1 signal at one terminal (e.g., positiveterminal) and the Gnd signal at another terminal (e.g., negativeterminal) to convert the Vbe1 signal. To convert the Vbe2 signal, forexample, the ADC 130 may receive the Vbe2 signal at one terminal (e.g.,positive terminal) and the Gnd signal at another terminal (e.g.,negative terminal). Also, for possible offset correction, the ADC 130may sample the Gnd signal by receiving the Gnd signal at both terminals.To generate digitized Vbe1 and Vbe2 signals with offset correction(DVbe1 and DVbe2), the sampled Gnd signal may be subtracted from therespective sampled Vbe1, Vbe2 signals.

The ADC 130 may be provided as a nyquist converter, an oversamplingconverter such as a sigma delta converter, a SAR (successiveapproximation register) converter, or other suitable ADC convertertypes. In an embodiment, for example, an oversampling converterembodiment, a digital filter 135 may also be provided following the ADC130. The digital filter 135 may further refine the digital values byreducing noise components introduced in the digital values by theoversampling function.

The logic unit 150 may receive the digital values and an a value fromthe a register 155, which may be a programmable register. a may be adigital coefficient representing a scaling factor. a may be errortolerant and may be programmable. The logic unit 150 may be provided asan arithmetic logic unit or the like.

Based on its input values, the logic unit 150 may generate the digitaltemperature code using a digital virtual reference according to theequation:

${Dtemp} = \frac{\alpha^{*}\left( {{{DVeb}2} - {{DVbe}1}} \right)}{{{DVbe}1}\; + {\alpha^{*}\left( {{{DVbe}2} - \; {{DVbe}1}} \right)}}$

where Dtemp is the digital temperature code, a is the scaling factor,DVbe1 is the digitized first base-emitter voltage Vbe1, and DVbe2 is thedigitized second base-emitter voltage Vbe2. The valueDVbe1+a*(DVbe2−DVbe1) may be referred to as the digital virtualreference.

The digital temperature code Dtemp, as represented in the aboveequation, may be independent of the reference voltage and, consequently,has improved immunity to reference voltage variation errors. To furtherillustrate that the digital temperate code may be independent of thereference voltage, consider that the digitized base-emitter voltages maybe represented by:

${{DVbe}(x)} = {\frac{{Vbe}(x)}{Vref} - \frac{VGnd}{Vref}}$

where Vref is the reference voltage used by the ADC 130 for conversion,Vbe(x) represents the base-emitter voltage sampled by the ADC 130 (i.e.,Vbe1/ Vbe2 at positive terminal and Gnd at negative terminal), VGndrepresents a ground input sampled by the ADC 130 (i.e., ground at bothterminals). By subtracting VGnd from Vbe(x), possible ADC offset codespresent in the ADC 130 may be nullified.

Based on the above equations, the digital temperature code may beexpressed as:

${Dtemp} = {\frac{\alpha*\left( \frac{{{Vbe}\; 2} - {{Vbe}\; 1}}{Vref} \right)}{\frac{{{Vbe}\; 1} + {\alpha*\left( {{{Vbe}\; 2} - {{Vbe}\; 1}} \right)}}{Vref}} = \frac{\alpha*\left( {{{Vbe}\; 2} - {{Vbe}\; 1}} \right)}{{{Vbe}\; 1} + {\alpha*\left( {{{Vbe}\; 2} - {{Vbe}\; 1}} \right)}}}$

Hence, Vref may be cancelled out in the digital temperature codecalculation. Since the digital temperature code is independent of thereference voltage, embodiments of the present invention may providedimproved immunity to PVT (process, voltage, temperature) errorsassociated with reference voltage variations. Since the temperaturesensor 100 may be provided at least in part by CMOS components, thedigital temperature code calculation according to embodiments of thepresent invention may provide an accurate temperature sensor withoutextra post-trimming.

FIG. 2 is a simplified circuit schematic of an analog sensor 200according to an embodiment of the present invention. The analog sensor200 may generate two base-emitter voltages that are proportional toambient temperature sequentially (i.e., one at a time). The analogsensor 200 may include a reference stage 210 and a sensing stage 250.The reference stage 210 may generate a reference current and referencevoltage. Based on the reference current and reference voltage, thesensing stage 250 may generate the pair of base-emitter voltages Vbe1,Vbe2 sequentially (i.e., one at a time).

The reference stage 210 may include a field effect transistor (FET) 212,a voltage resistor divider network (R1, R2, R3), a chop switch 214, anamplifier 216, and a pair of bipolar junction transistors (BJT) 218,220. The FET 212 may generate a reference current Iref and a band gapvoltage Vbg. The FET 212 may be coupled to an RC filter (Rz, Cc). Theband gap voltage Vbg may be coupled to the chop switch 214 and the BJTs218, 220 through the resistor divider network R1, R2, and R3. The chopswitch 214 may be a cross-connect switch that changes connections fromthe resistor divider network to the amplifier 216 in a first period anda second period respectively. In an embodiment, the amplifier 216 mayalso include a second chop switch 222 that works in conjunction with thefirst chop switch 222 to cross-connect internal amplifier connections,shown in FIG. 3. By changing the directions of the chop switch(es) andaveraging the results, offset errors may be reduced.

The amplifier 216 may be a feedback amplifier. In an embodiment, theamplifier 216 may be provided as a cascode opamp or other suitableamplifier structures. FIG. 3 is a simplified circuit schematic of ananalog sensor 300 with a cascode op-amp 310 according to an embodimentof the present invention.

Returning to FIG. 2, the sensing stage 250 may include two FETs 252,254; two switches 256, 258; and a BJT 260. The FETs 252, 254 may becoupled to an output of the reference stage 210, in particular to anoutput of the amplifier 216. The switches 256, 258 may be turned on/offone at a time in alternate fashion responsive to control signalsSel_vbe1 and Sel_vbe2. When switch 256 is closed and switch 258 is open,FET 252 may be coupled to the emitter node of BJT 260 and may generatethe first base-emitter voltage Vbe1. When switch 258 is closed andswitch 256 is open, FET 254 may be coupled to the emitter node of BJT260 and may generate the second base-emitter voltage Vbe2. Hence, thesensing stage 250 may generate the pair of base-emitter voltages Vbe1,Vbe2 sequentially. Further, the pair of base-emitter voltages Vbe1, Vbe2may be proportional (linearly or conversely) to ambient temperaturebecause the sensing stage 250 functionality varies based on temperature.As discussed, the two base-emitter voltages Vbe1, Vbe2 may vary in CTATfashion.

Relative sizes of the FETs 252, 254 may be chosen to generate scalecurrents through the respective transistors in response to a commoninput signal. Thus during a time that Sel_vbe2 is active, FET 254 maygenerate a current through BJT 260 that is K times larger than thecurrent induced by FET 252 when Sel_vbe1 is active. The scaled currentsinduce different values in Vbe1 and Vbe2 outputs. The scaling factors M,K, and N may be optimized based on the CMOS component characteristics.For example, the M value choice may balance settling time and linearityproperties. The K value choice may balance the ADC's dynamic range(resolution) and mismatch errors. The N value may balance offset andnon-linearity errors.

FIG. 4 illustrates a timing diagram of a temperature sensor deviceoperations according to an embodiment of the present invention.Analog_sensor_en may be a control signal enabling the analog sensor.ADC_en may be a control signal enabling the ADC. Chop may be a controlsignal switching the connection directions of the chop switch(es).Sel_Vbe1 may a selection signal to connect Vbe1 to one terminal of theADC (the other terminal to Gnd). Sel_Vbe2 may be a selection signal toconnect Vbe2 to one terminal of the ADC (the other terminal to Gnd).Sel_Gnd may be a selection signal to connect both terminals of the ADCto Gnd via the multiplexer.

Initially, the analog sensor may be enabled for length of timeT_(sensor enable). After a sensor settling time T_(sensor settling) tostabilize the band gap voltage Vbg, the ADC may be enabled when ADC_engoes high. The bang gap voltage may also be used as a reference voltagein some form by the ADC. With the ADC enabled, the pair of base emittervoltages Vbe1, Vbe2 and the reference ground signal may be generated bythe analog sensor, outputted by the multiplexer, and sampled by the ADCsequentially as controlled by the selection signals Sel_Vbe1, Sel_Vbe2,and Sel_Gnd. For example, Vbe1 may generated and sampled first, thenVbe2 may be generated and sampled second, and the reference groundsignal may generated and sampled third.

The digital temperature code may be generated from these values, asdescribed above, using the digital virtual reference according to theequation:

${Dtemp} = \frac{\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}{{{DVbe}\; 1} + {\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}}$

where Dtemp is the digital temperature code, a is the scaling factor,DVbe1 is the digitized first base-emitter voltage Vbe1, and DVbe2 is thedigitized second base-emitter voltage Vbe2. The digitized base-emittervoltages may be generated according to:

${{DVbe}(x)} = {\frac{{Vbe}(x)}{Vref} - \frac{VGnd}{Vref}}$

where Vref is the reference voltage used by the ADC 130 for conversion,Vbe(x) represents the base-emitter voltage sampled by the ADC 130 (i.e.,Vbe1/ Vbe2 at positive terminal and Gnd at negative terminal), VGndrepresents a ground input sampled by the ADC 130 (i.e., ground at bothterminals). By subtracting VGnd from Vbe(x), possible ADC offset codespresent in the ADC 130 may be nullified.

In an embodiment of the present invention, an offset error in the analogsensor may also be reduced and/or eliminated. The digital temperaturecode generation may be repeated while changing direction of the choppingswitches in the analog sensor. For example, the pair of base emittervoltages Vbe1, Vbe2 and the reference ground signal may be generated bythe analog sensor, outputted by the multiplexer, and sampled by the ADCin a first set. During the first set, the chop signal may be set to onepolarity (e.g., Chop(−)). The digital temperature code may be generatedfrom these first set values represented by Dtemp_chop(−). Next, the pairof base emitter voltages Vbe1, Vbe2 and the reference ground signal maybe generated by the analog sensor, outputted by the multiplexer, andsampled by the ADC in a second set. During the first set, the chopsignal may be set to a second polarity (e.g., Chop(+)). The digitaltemperature code may be generated from these second set valuesrepresented by Dtemp_chop(+). An average of the digital temperaturecodes with each chop direction may be performed, expressed as:

${Dtemp\_ avg} = \frac{{{Dtemp\_ chop}( - )} + {{Dtemp\_ chop}( + )}}{2}$

By averaging the digital temperature codes generated in each chopdirection, the offset error in the analog sensor may be reduced and/oreliminated.

In another embodiment of the present invention, the pair of base-emittervoltages Vbe1, Vbe2 may be generated simultaneously rather thansequentially. FIG. 5 is a block diagram of a temperature sensor 500according to an embodiment of the present invention. The temperaturesensor 100 may include an analog sensor 510, a multiplexer 520, an ADC530, a reference amplifier 540, a logic unit 550, an a register 555, anda control circuit 560.

The analog sensor 510 may generate two different voltage signals thatvary proportionally to ambient temperature simultaneously, and the twovoltage signals may be two different base-emitter voltages Vbe1, Vbe2.Hence, the analog sensor 510 may have two output lines, one for eachgenerated voltage signal. The two base-emitter voltages Vbe1, Vbe2 maybe have CTAT characteristics, meaning that they increase with increasingtemperature.

In an embodiment, the analog sensor 510 may be provided as a singlesubstrate PNP BJT device with two different current densities. Theanalog sensor 510 operations, such as selection of the base-emittervoltages, chopping, and enabling (powering up/down), may be performed inaccordance with respective control signals from the control circuit 560.

The control circuit 560 may control the operations of the temperaturesensor 100 and its components. For example, the control circuit 560 mayreceive a clock signal Clk and provide timing signals to othercomponents in the temperature sensor 500. The control circuit 560 may beprovided as a microcontroller, a microprocessor, a state machine or thelike.

The analog sensor 510 may output the base-emitter voltages Vbe1, Vbe2simultaneously to the multiplexer 120. The multiplexer 120 may alsoreceive a ground input, Gnd. Based on a selection signal from thecontrol circuit 160, the multiplexer 120 may transmit its receivedsignals (e.g., Vbe1, Vbe2, Gnd) to the ADC 130.

The ADC 530 may sample the signals and generate corresponding digitalvalues. The ADC 530 may digitize the analog signals based on a referencevoltage. In an embodiment, the reference voltage may be generated basedon a band gap voltage Vbg generated by the analog sensor. The band gapvoltage Vbg may be amplified by the reference amplifier 540 to generatethe reference voltage. Alternatively, the reference voltage may beprovided from another supply source. As described herein, digitaltemperature code calculation according to embodiments of the presentinvention may be independent of the reference voltage.

Since the base-emitter voltages may be generated simultaneously, the ADC530 may sample the difference between the two base-emitter voltagesdirectly. For example, the ADC 530 may receive the Vbe2 signal at oneterminal (e.g., positive terminal) and the Vbe1 at another terminal(e.g., negative terminal) to digitize a difference of the base-emittervoltages, Vbe2−Vbe1. The ADC 530 may also sample Vbe1 and Gnd asdescribed above.

The ADC 530 may be provided as a nyquist converter, an oversamplingconverter such as a sigma delta converter, a SAR (successiveapproximation register) converter, or other suitable ADC convertertypes. In an embodiment, for example an oversampling converterembodiment, a digital filter 535 may also be provided following the ADC530. The digital filter 535 may further refine the digital values byreducing noise components introduced in the digital values by theoversampling function.

The logic unit 550 may receive the digital values and an a value fromthe a register 555, which may be a programmable register. a may be adigital coefficient representing a scaling factor. a may be errortolerant and may be programmable. The logic unit 550 may be provided asan arithmetic logic unit or the like.

Based on its input values, the logic unit 550 may generate the digitaltemperature code using a digital virtual reference according to theequation:

${Dtemp} = \frac{\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}{{{DVbe}\; 1} + {\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}}$

where Dtemp is the digital temperature code, a is a scaling factor,DVbe1 is the digitized first base-emitter voltage Vbe1, and DVbe2 is thedigitized second base-emitter voltage Vbe2. The valueDVbe1+a*(DVbe2−DVbe1) may be referred to as the digital virtualreference. The digitized base-emitter voltages may be generatedaccording to:

${{DVbe}(x)} = {\frac{{Vbe}(x)}{Vref} - \frac{VGnd}{Vref}}$

where Vref is the reference voltage used by the ADC 130 for conversion,Vbe(x) represents the base-emitter voltage sampled by the ADC 130 (i.e.,Vbe1/ Vbe2 at positive terminal and Gnd at negative terminal), VGndrepresents a ground input sampled by the ADC 130 (i.e., ground at bothterminals). By subtracting VGnd from Vbe(x), possible ADC offset codespresent in the ADC 130 may be nullified.

FIG. 6 is a simplified circuit schematic of an analog sensor 600according to an embodiment of the present invention. The analog sensor600 may generate two base-emitter voltages that are proportional toambient temperature substantially simultaneously (i.e., at the sametime). The analog sensor 600 may include a reference stage 610 and asensing stage 650. The reference stage 610 may generate a referencecurrent and reference voltage. Based on the reference current andreference voltage, the sensing stage 650 may generate the pair ofbase-emitter voltages Vbe1, Vbe2 simultaneously.

The reference stage 610 may include a FET 612, a voltage resistordivider network (R1, R2, R3), a chop switch 614, an amplifier 616, and apair of BJTs 618, 620. The FET 612 may generate a reference current Irefand a band gap voltage Vbg. The FET 612 may be coupled to an RC filter(Rz, Cc). The band gap voltage Vbg may be coupled to the chop switch 614and the BJTs 618, 620 through the resistor divider network R1, R2, andR3. The chop switch 614 may be a cross-connect switch that changesconnections from the resistor divider network to the amplifier 616 in afirst period and a second period respectively. In an embodiment, theamplifier 616 may also include a second chop switch 622 that works inconjunction with the first chop switch 622 to cross-connect internalamplifier connections, shown in FIG. 3. By changing the directions ofthe chop switch(es) and averaging the results, offset errors may bereduced.

The amplifier 616 may be a feedback amplifier. For example, theamplifier 616 may be provided as a cascode opamp or other suitableamplifier structure.

The sensing stage 650 may include two FETs 652, 654 and two BJTs 656,658. The FETs 652, 654 may be coupled to an output of the referencestage 610, in particular to an output of the amplifier 616. The FET 652may be coupled to the emitter node of BJT 656 to generate the firstbase-emitter voltage Vbe1. The FET 654 may be coupled to the emitternode of BJT 658 to generate the second base-emitter voltage Vbe2. Hence,the pair of base-emitter voltages may be generated simultaneously.

FIG. 7 illustrates a timing diagram of a temperature sensor deviceoperations according to an embodiment of the present invention.Analog_sensor_en may be a control signal enabling the analog sensor.ADC_en may be a control signal enabling the ADC. Chop may be a controlsignal switching the connection directions of the chop switch(es).Sel_(Vbe2−Vbe1 ) may a selection signal to connect Vbe2 to one terminal(e.g., positive terminal) and Vbe1 to another terminal (e.g., negativeterminal) of the ADC. Sel_Gnd may be a selection signal to connect bothterminals of the ADC to Gnd.

Initially, the analog sensor (BJT sensor) may be enabled for length oftime Tsensor enable. After a sensor settling time Tsensor settling tostabilize the band gap voltage Vbg, the ADC may be enabled. The bang gapvoltage may also be used as a reference voltage in some form by the ADC.With the ADC enabled, the pair of base emitter voltages Vbe1, Vbe2 andthe reference ground signal may be generated by the analog sensor,outputted by the multiplexer, and sampled by the ADC. For example, sincethe pair of emitter voltages may be generated simultaneously, thedifference of the base-emitter voltages Vbe2−Vbe1 may be directlysampled by coupling one terminal of the ADC to Vbe2 and the otherterminal of the ADC to Vbe1.

The digital temperature code may be generated from these values, asdescribed above, using the digital virtual reference according to theequation:

${Dtemp} = \frac{\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}{{{DVbe}\; 1} + {\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}}$

where Dtemp is the digital temperature code, a is the scaling factor,DVbe1 is the digitized first base-emitter voltage Vbe1, and DVbe2 is thedigitized second base-emitter voltage Vbe2. The digitized base-emittervoltages may be generated according to:

${{DVbe}(x)} = {\frac{{Vbe}(x)}{Vref} - \frac{VGnd}{Vref}}$

where Vref is the reference voltage used by the ADC 130 for conversion,Vbe(x) represents the base-emitter voltage sampled by the ADC 130 (i.e.,Vbe1/ Vbe2 at positive terminal and Gnd at negative terminal), VGndrepresents a ground input sampled by the ADC 130 (i.e., ground at bothterminals).

Temperature sensor embodiments described herein may be integrated intolarger electronic devices where temperature measurements may improve theelectronic device functionality. For example, a temperature sensoraccording to embodiments described herein may be integrated into acellular phone, an automobile control panel and audio system, a drillingapparatus, a lens driver, a PC system (thermal chip-level management),etc.

FIG. 8 is a block diagram of an electronic device 800 with an integratedtemperature sensor according to an embodiment of the present invention.The electronic device 800 may include a temperature sensor 810, aprocessor 820, other sensor(s) 830, output device(s) 840, inputdevice(s) 850, and a clock 860 to provide timing signals for the device800 components.

The temperature sensor 810 may be provided according to the variousembodiments described herein and may generate a digital temperature codeaccording to the various embodiments disclosed herein. The processor 820may be a microprocessor, microcontroller, state machine, or the like.The processor 820 may receive a calculated digital temperature code fromthe temperature sensor 810 and may adjust the operations of the device800 according to the temperature code.

In an embodiment, the device 800 may adjust other sensor readings (e.g.,from sensor(s) 830) based on the measured temperature. For example, thesensor(s) 830 may include a position sensor, and the position sensorcomponents may be susceptible to variations associated with temperaturechanges. The processor 820 may adjust the sensor(s) 830 readings basedon temperature measurements provided by the temperature sensor 810 and,therefore, improve accuracy of the sensor(s) 830 readings.

In an embodiment, the device 830 may adjust output device(s) operationsbased on the measured temperature. For example, the output device(s) 840may include a coolant device such as a fan that operates based on theambient temperature. The processor 820 may control the output device(s)840 operations based on temperature measurements provided by thetemperature sensor 810 and, therefore, may improve output device(s) 840operations.

In an embodiment, the device 830 may adjust input device(s) inputs basedon the measured temperature. For example, the input device(s) 840 mayinclude a touch screen interface, and the interface's sensitivity may besusceptible to temperature variation associated errors. The processor820 may adjust the input device(s) 820 based on temperature measurementsprovided by the temperature sensor 810 and, therefore, improve inputdevice(s) 850 operations.

Those skilled in the art may appreciate from the foregoing descriptionthat the present invention may be implemented in a variety of forms, andthat the various embodiments may be implemented alone or in combination.Therefore, while the embodiments of the present invention have beendescribed in connection with particular examples thereof, the true scopeof the embodiments and/or methods of the present invention should not beso limited since other modifications will become apparent to the skilledpractitioner upon a study of the drawings, specification, and followingclaims.

Various embodiments may be implemented using hardware elements, softwareelements, or a combination of both. Examples of hardware elements mayinclude processors, microprocessors, circuits, circuit elements (e.g.,transistors, resistors, capacitors, inductors, and so forth), integratedcircuits, application specific integrated circuits (ASIC), programmablelogic devices (PLD), digital signal processors (DSP), field programmablegate array (FPGA), logic gates, registers, semiconductor device, chips,microchips, chip sets, and so forth. Examples of software may includesoftware components, programs, applications, computer programs,application programs, system programs, machine programs, operatingsystem software, middleware, firmware, software modules, routines,subroutines, functions, methods, procedures, software interfaces,application program interfaces (API), instruction sets, computing code,computer code, code segments, computer code segments, words, values,symbols, or any combination thereof. Determining whether an embodimentis implemented using hardware elements and/or software elements may varyin accordance with any number of factors, such as desired computationalrate, power levels, heat tolerances, processing cycle budget, input datarates, output data rates, memory resources, data bus speeds and otherdesign or performance constraints.

Some embodiments may be implemented, for example, using acomputer-readable medium or article which may store an instruction or aset of instructions that, if executed by a machine, may cause themachine to perform a method and/or operations in accordance with theembodiments. Such a machine may include, for example, any suitableprocessing platform, computing platform, computing device, processingdevice, computing system, processing system, computer, processor, or thelike, and may be implemented using any suitable combination of hardwareand/or software. The computer-readable medium or article may include,for example, any suitable type of memory unit, memory device, memoryarticle, memory medium, storage device, storage article, storage mediumand/or storage unit, for example, memory, removable or non-removablemedia, erasable or non-erasable media, writeable or re-writeable media,digital or analog media, hard disk, floppy disk, Compact Disc Read OnlyMemory (CD-ROM), Compact Disc Recordable (CD-R), Compact DiscRewriteable (CD-RW), optical disk, magnetic media, magneto-opticalmedia, removable memory cards or disks, various types of DigitalVersatile Disc (DVD), a tape, a cassette, or the like. The instructionsmay include any suitable type of code, such as source code, compiledcode, interpreted code, executable code, static code, dynamic code,encrypted code, and the like, implemented using any suitable high-level,low-level, object-oriented, visual, compiled and/or interpretedprogramming language.

We claim:
 1. A temperature sensor device, comprising: an analog voltagegenerator to generate a first voltage and a second voltage that vary inproportion to ambient temperature; an analog-to-digital converter (ADC)to sample the voltages and generate corresponding digital values using areference voltage; and a logic unit to calculate ambient temperaturefrom a comparison of the digital values, wherein the ambient temperaturecalculation is independent of reference voltage variations.
 2. Thetemperature sensor device of claim 1, wherein the first voltage is afirst base-emitter voltage and the second voltage is a secondbase-emitter voltage, wherein the logic unit calculates the digitaltemperature code according to:${{Dtemp} = \frac{\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}{{{DVbe}\; 1} + {\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}}},$where Dtemp is the digital temperature code, a is a scaling factor,DVbe1 is a first digitized base-emitter voltage, DVbe2 is a seconddigitized base-emitter voltage, and DVbe1+a*(DVbe2−DVbe1) is a digitalvirtual reference.
 3. The temperature sensor device of claim 2, wherein${{DVbe}\; 1} = {\frac{{Vbe}\; 1}{Vref} - \frac{VGnd}{Vref}}$ and${{{DVbe}\; 2} = {\frac{{Vbe}\; 2}{Vref} - \frac{VGnd}{Vref}}},$where Vbe1 is the first base-emitter voltage, Vbe2 is the secondbase-emitter voltage, VGnd is a ground voltage, and Vref is thereference voltage.
 4. The temperature sensor device of claim 1, whereinthe analog voltage generator includes a reference stage and a sensingstage.
 5. The temperature sensor device of claim 4, wherein thereference stage includes a chop circuit with a cross connect switch. 6.The temperature sensor device of claim 4, wherein the reference stagegenerates a band gap reference voltage, wherein reference voltage isbased on the band gap reference.
 7. The temperature sensor device ofclaim 4, wherein the sensing stage comprises a single bipolar junctiontransistor.
 8. The temperature sensor device of claim 4, wherein thesensing stage comprises a pair of bipolar junction transistors.
 9. Thetemperature sensor device of claim 1, wherein the analog-to-digitalconverter is an oversampling analog-to-digital converter, and furthercomprises a digital filter.
 10. The temperature sensor device of claim1, further comprises a multiplexer.
 11. A method comprising: generatinga pair of voltages, the voltages corresponding to absolute temperaturemeasurements; digitizing the voltages to generate digital samples usinga reference voltage; and calculating ambient temperature based on thedigital samples that is independent of reference voltage variations. 12.The method of claim 11, wherein the voltages are base-emitter voltagesand wherein the calculating is according to:${{Dtemp} = \frac{\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}{{{DVbe}\; 1} + {\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}}},$where Dtemp is the digital temperature code, a is a scaling factor,DVbe1 is a first digitized base-emitter voltage, DVbe2 is a seconddigitized base-emitter voltage, and DVbe1+a*(DVbe2−DVbe1) is a digitalvirtual reference.
 13. The method of claim 12, wherein${{DVbe}\; 1} = {\frac{{Vbe}\; 1}{Vref} - \frac{VGnd}{Vref}}$ and${{{DVbe}\; 2} = {\frac{{Vbe}\; 2}{Vref} - \frac{VGnd}{Vref}}},$where Vbe1 is the first base-emitter voltage, Vbe2 is the secondbase-emitter voltage, VGnd is a ground voltage, and Vref is thereference voltage.
 14. The method of claim 11, wherein the pair ofvoltages are generated sequentially.
 15. The method of claim 11, whereinthe pair of voltages are generated simultaneously.
 16. The method ofclaim 11, further comprises filtering the digital samples.
 17. Themethod of claim 11, further comprises generating a band-gap voltage andwherein the reference voltage is based on the band-gap voltage.
 18. Themethod of claim 11, further comprises canceling an offset errorgenerated in the digitizing by switching directions of chopping switchesand averaging results of the digital temperature code in each switchdirection together.
 19. An electronic device, comprising: a temperaturemeasurement system comprising, an analog sensor to generate a firstvoltage and a second voltage that vary in proportion to ambienttemperature, an analog-to-digital converter (ADC) to sample the voltagesand generate corresponding digital values using a reference voltage, alogic unit to calculate ambient temperature from a comparison of thedigital values, wherein the ambient temperature calculation isindependent of reference voltage variations; a component, and aprocessor to receive to the ambient temperature calculation and adjustan operation of the component in response.
 20. The electronic device ofclaim 19, wherein the first voltage is a first base-emitter voltage andthe second voltage is a second base-emitter voltage, wherein the logicunit calculates the digital temperature code according to:${{Dtemp} = \frac{\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}{{{DVbe}\; 1} + {\alpha*\left( {{{DVbe}\; 2} - {{DVbe}\; 1}} \right)}}},$where Dtemp is the digital temperature code, a is a scaling factor,DVbe1 is a first digitized base-emitter voltage, DVbe2 is a seconddigitized base-emitter voltage, and DVbe1+a*(DVbe2−DVbe1) is a digitalvirtual reference, wherein${{DVbe}\; 1} = {\frac{{Vbe}\; 1}{Vref} - \frac{VGnd}{Vref}}$ and${{{{DVbe}\; 2} = {\frac{{Vbe}\; 2}{Vref} - \frac{VGnd}{Vref}}},}\;$where Vbe1 is the first base-emitter voltage, Vbe2 is the secondbase-emitter voltage, VGnd is a ground voltage, and Vref is thereference voltage.
 21. The electronic device of claim 19, wherein thecomponent is a sensor device.
 22. The electronic device of claim 19,wherein the component is an output device.